// PartTypeVariable.h: interface for the PartTypeVariable class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PARTTYPEVARIABLE_H__8F9A3523_E771_45B4_8B27_4901D34A3229__INCLUDED_)
#define AFX_PARTTYPEVARIABLE_H__8F9A3523_E771_45B4_8B27_4901D34A3229__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "NonDBVariable.h"

namespace PropertySystem
{
	class DllExport PartTypeVariable : public NonDBVariable  
	{
		UE_DECLARE_DYNAMIC(PartTypeVariable);
	public:
		PartTypeVariable();
		virtual ~PartTypeVariable();
		
	public:
		virtual void InitValue();
		virtual PropertyVariable* Clone();
		virtual BOOL Accept(PropertyVisitor& visitor);
		virtual operator Part*();
		virtual operator PropertyStackInterface*();
		virtual void RegisterEffect();
		virtual void UnRegisterEffect();

	public:
		void PartID(const CString& strPartID){
			m_strPartID = strPartID;
		}

		void PartStandard(const CString& strStandard){
			m_strPartStandard = strStandard;
		}

		BOOL IsOwner() const {
			return m_bIsOwner;
		}

		void SetNoOwner();

		void SetPart(Part* pPart){
			m_pPart = pPart;
		}

	private:
		Part* m_pPart;
		CString m_strPartID;
		CString m_strPartStandard;
		CString m_strPartIndex;
		BOOL m_bIsOwner;
	};
}
#endif // !defined(AFX_PARTTYPEVARIABLE_H__8F9A3523_E771_45B4_8B27_4901D34A3229__INCLUDED_)
